/**
 * @project name:crm
 */
package com.yunbo.crm.controller;

import com.yunbo.crm.base.BaseController;
import com.yunbo.crm.pojo.SysConfig;
import com.yunbo.crm.service.SysConfigService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * @Author : yun&bo
 * @CreateDate : ==>2021/1/25 13:51
 * @ClassName : ==>
 * @Description : ==>
 * @Version
 */
@RestController
@RequestMapping("sys_default")
public class SysDefault extends BaseController {
    @Resource
    private SysConfigService sysConfigService;

    @GetMapping("index")
    public ModelAndView goIndex(ModelAndView modelAndView, SysConfig sysConfig) {
        System.out.println("我的天啊");
        modelAndView.setViewName("sys/sys_st");
        sysConfig = sysConfigService.findDefaultSysConfig();
        modelAndView.addObject("sysConfig", sysConfig);
        return modelAndView;
    }
}
